package com.zc.chapter41.component;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestMain {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(TestConfiguration.class);


        TestBean testBean = (TestBean) context.getBean("testBean");
        testBean.sayHello();

        TestDao testDao = (TestDao) context.getBean("aaaaa");
        testDao.printInfo();


        TestService testService = (TestService) context.getBean("testService");
        testService.printInfo();
    }
}
